Method for intra prediction and device therefor

ABSTRACT

A method for intra prediction comprises determining a first MPM candidate corresponding to a left-side candidate block on the basis of a position of the left-side candidate block adjacent to a left side of a current block; determining a second MPM candidate corresponding to an upper-end candidate block on the basis of a position of the upper-end candidate block adjacent to an upper end of the current block; generating an MPM candidate list including a plurality of MPM candidates, on the basis of the first MPM candidate and the second MPM candidate; and determining one MPM candidate of the plurality of the MPM candidates that constitute the MPM candidate list as an intra prediction mode of the current block, and performing intra prediction for the current block on the basis of the determined intra prediction mode to generate a prediction block corresponding to the current block.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of International ApplicationPCT/KR2012/008442, filed on Oct. 16, 2012, which claims the benefit ofU.S. Provisional Application No. 61/548,706, filed on Oct. 18, 2011, andU.S. Provisional Application No. 61/557,385, filed on Nov. 8, 2011, theentire content of the prior applications is incorporated by reference.

TECHNICAL FIELD

The present invention relates to image processing, and moreparticularly, to an intra prediction method and apparatus.

BACKGROUND ART

Recently, there is a growing demand for images with high resolution andhigh quality such as high definition (HD) images and ultra highdefinition (UHD) images in various fields. In comparison with theexisting image data, high resolution and high quality image datarequires a relatively great information amount or bit amount. Therefore,a transmission cost and a storage cost are increased when the image datais transmitted by using a medium such as the existing wired/wirelessbroadband line or when the image data is stored by using the existingstorage medium. To solve these problems, high-efficient imagecompression techniques may be used.

As the image compression technique, there are various techniques such asan inter prediction technique which predicts a pixel value included in acurrent picture from a previous and/or next picture of the currentpicture, an intra prediction technique which predicts a pixel valueincluded in a current picture by using pixel information in the currentpicture, an entropy encoding technique which allocates a short codewordto a value having a high appearance frequency and allocates a longcodeword to a value having a low appearance frequency, etc.

Such an image compression technique may be used to transmit or storeimage data by effectively compressing the image data.

SUMMARY OF INVENTION Technical Problem

The present invention provides an image coding method and apparatuscapable of improving a coding/decoding efficiency.

The present invention also provides an image decoding method andapparatus capable of improving a coding/decoding efficiency.

The present invention also provides an intra prediction method andapparatus capable of improving a coding/decoding efficiency.

The present invention also provides an intra prediction mode derivingmethod and apparatus capable of improving a coding/decoding efficiency.

Technical Solution

According to an aspect of the present invention, an intra predictionmethod is provided. The method includes: determining a first mostprobable mode (MPM) candidate corresponding to a left candidate block onthe basis of a location of the left candidate block adjacent to a leftside of a current block; determining a second MPM candidatecorresponding to an upper candidate block on the basis of a location ofthe upper candidate block adjacent to an upper portion of the currentblock; generating an MPM candidate list including a plurality of MPMcandidates on the basis of the first MPM candidate and the second MPMcandidate; and determining one MPM candidate as an intra prediction modeof the current block among a plurality of MPM candidates constitutingthe MPM candidate list, and performing an intra prediction on thecurrent block on the basis of the determined intra prediction mode, soas to generate a prediction block corresponding to the current block.

In the aforementioned aspect of the present invention, at least one MPMcandidate between the first MPM candidate and the second MPM candidatemay be determined according to whether a candidate block correspondingto the at least one MPM candidate between the left candidate block andthe upper candidate block is located outside a coding tree block (CTB)to which the current block belongs.

In addition, if the upper candidate is located outside the CTB to whichthe current block belongs, the determining of the first MPM candidatemay further include assigning a specific intra prediction mode to theupper candidate block, and determining the intra prediction modeassigned to the upper candidate block as the first MPM candidate.

In addition, the specific intra prediction mode may be a DC mode.

In addition, in the determining of the first MPM candidate, if the leftcandidate block is located outside a current picture to which thecurrent block belongs, the first MPM candidate may be determined to a DCmode, and in the determining of the second MPM candidate, if the uppercandidate block is located outside the current picture, the second MPMcandidate may be determined to the DC mode.

In addition, in the determining of the first MPM candidate, if the leftcandidate block is located outside a current slice to which the currentblock belongs, the first MPM candidate may be determined to a DC mode,and in the determining of the second MPM candidate, if the uppercandidate block is located outside the current slice, the second MPMcandidate may be determined to the DC mode.

In addition, in the determining of the first MPM candidate, if aprediction mode of the left candidate block is not an intra mode, thefirst MPM candidate may be determined to a DC mode, and in thedetermining of the second MPM candidate, if a prediction mode of theupper candidate block is not the intra mode, the second MPM candidatemay be determined to the DC mode.

According to another aspect of the present invention, an image decodingmethod is provided. The method includes: determining a first MPMcandidate corresponding to a left candidate block on the basis of alocation of the left candidate block adjacent to a left side of acurrent block; determining a second MPM candidate corresponding to anupper candidate block on the basis of a location of the upper candidateblock adjacent to an upper portion of the current block; generating anMPM candidate list including a plurality of MPM candidates on the basisof the first MPM candidate and the second MPM candidate; determining oneMPM candidate as an intra prediction mode of the current block among aplurality of MPM candidates constituting the MPM candidate list, andperforming an intra prediction on the current block on the basis of thedetermined intra prediction mode to generate a prediction blockcorresponding to the current block; and generating a reconstructed blockon the basis of the prediction block.

In the aforementioned aspect of the present invention, at least one MPMcandidate between the first MPM candidate and the second MPM candidatemay be determined according to whether a candidate block correspondingto the at least one MPM candidate between the left candidate block andthe upper candidate block is located outside a CTB to which the currentblock belongs.

In addition, if the upper candidate is located outside the CTB to whichthe current block belongs, the determining of the first MPM candidatemay further includes assigning a specific intra prediction mode to theupper candidate block, and determining the intra prediction modeassigned to the upper candidate block as the first MPM candidate.

In addition, the specific intra prediction mode may be a DC mode.

In addition, in the determining of the first MPM candidate, if the leftcandidate block is located outside a current picture to which thecurrent block belongs, the first MPM candidate may be determined to a DCmode, and in the determining of the second MPM candidate, if the uppercandidate block is located outside the current picture, the second MPMcandidate may be determined to the DC mode.

In addition, in the determining of the first MPM candidate, if the leftcandidate block is located outside a current slice to which the currentblock belongs, the first MPM candidate may be determined to a DC mode,and in the determining of the second MPM candidate, if the uppercandidate block is located outside the current slice, the second MPMcandidate may be determined to the DC mode.

In addition, in the determining of the first MPM candidate, if aprediction mode of the left candidate block is not an intra mode, thefirst MPM candidate may be determined to a DC mode, and in thedetermining of the second MPM candidate, if a prediction mode of theupper candidate block is not the intra mode, the second MPM candidatemay be determined to the DC mode.

According to another aspect of the present invention, an image decodingapparatus is provided. The apparatus includes: an intra predictor fordetermining an intra prediction mode of a current block and performingan intra prediction on the current block on the basis of the determinedintra prediction mode, so as to generate a prediction blockcorresponding to the current block; and a reconstructed block generatorfor generating a reconstructed block on the basis of the predictionblock. Herein, the intra predictor may determine a first MPM candidatecorresponding to a left candidate block on the basis of a location ofthe left candidate block adjacent to a left side of the current block,and determine a second MPM candidate corresponding to an upper candidateblock on the basis of a location of the upper candidate block adjacentto an upper portion of the current block generates an MPM candidate listincluding a plurality of MPM candidates on the basis of the first MPMcandidate and the second MPM candidate, and determine one MPM candidateas an intra prediction mode of the current block among a plurality ofMPM candidates constituting the MPM candidate list.

Advantageous Effects

An image coding method according to the present invention can improve animage coding/decoding efficiency.

An image decoding method according to the present invention can improvean image coding/decoding efficiency.

An intra prediction method according to the present invention canimprove an image coding/decoding efficiency.

An intra prediction mode deriving method of the present invention canimprove an image coding/decoding efficiency.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of an image encoder according to an embodimentof the present invention.

FIG. 2 is a schematic view showing the concept of a predictor accordingto an embodiment of the present invention.

FIG. 3 is a block diagram of an image decoder according to an embodimentof the present invention.

FIG. 4 is a schematic view showing the concept of a predictor of animage decoder according to an embodiment of the present invention.

FIG. 5 is a schematic view showing the concept of an example of a quadtree structure of a processing unit in a system according to the presentinvention.

FIG. 6 is a flowchart showing a method of transmitting intra predictionmode information according to an embodiment of the present invention.

FIG. 7 is a flowchart showing a method of deriving an intra predictionmode according to an embodiment of the present invention.

FIG. 8 is a schematic view showing an embodiment of a neighboring blockused to derive a most probable mode (MPM) candidate.

FIG. 9 is a drawing for explaining a line buffer in which an intraprediction mode is stored.

FIG. 10 is a schematic view showing an embodiment of a method ofderiving an MPM candidate of a block adjacent to a boundary of a largestcoding unit (LCU).

FIG. 11 is a schematic view showing an embodiment of a method ofderiving an MPM candidate according to the present invention.

FIG. 12 is a schematic view showing an embodiment of a method ofderiving an MPM candidate on the basis of an intra mode storing unit.

FIG. 13 is a schematic view showing embodiments of a 2:1 line buffercompression scheme.

FIG. 14 is a schematic view showing embodiments of a 4:1 line buffercompression scheme.

MODE FOR INVENTION

Since the present invention may have various modifications and diverseembodiments, only specific embodiments are exemplarily illustrated inthe drawings and will be described in detail. However, the presentinvention should not be construed as being limited to the specificembodiments set forth herein. The terminology used herein is for thepurpose of describing particular embodiments only and is not intended tobe limiting of the invention. As used herein, the singular forms areintended to include the plural forms as well, unless the context clearlyindicates otherwise. In the present application, it is to be understoodthat the terms such as “including” or “having”, etc., are intended toindicate the existence of the features, numbers, operations, actions,components, parts, or combinations thereof disclosed in thespecification, and are not intended to preclude the possibility that oneor more other features, numbers, operations, actions, components, parts,or combinations thereof may exist or may be added.

Meanwhile, respective constructions in the drawings described in thepresent invention are illustrated independently for convenience ofexplanation regarding different particular functions in an imageencoder/decoder, and it does not imply that the respective constructionsare implemented with separate hardware entities or separate softwareentities. For example, among the respective constructions, two or moreconstructions may be combined into one construction, and oneconstruction may be divided into a plurality of constructions.Embodiments in which the respective constructions are integrated and/orseparated are also included in the scope of the present invention aslong as not departing from the spirit of the invention.

In addition, some constitutional elements may be not essentialconstitutional elements for performing intrinsic functions but selectiveconstitutional elements for improving only performance. The presentinvention may be implemented by including only the essentialconstitutional elements for implementing the spirit of the presentinvention except for the constitutional elements used to improve onlyperformance. A structure in which only the essential constitutionalelements are included except for the selective constitutional elementsused for improving only performance is also included in the scope of thepresent invention.

Hereinafter, embodiments of the present invention will be described indetail with reference to the accompanying drawings. In addition, likereference numerals are used to indicate like elements throughout thedrawings, and the same descriptions on the like elements will beomitted.

FIG. 1 is a block diagram of an image encoder according to an embodimentof the present invention. Referring to FIG. 1, an image encoder 100includes a picture divider 105, a predictor 110, a transformer 115, aquantizer 120, a rearranger 125, an entropy encoder 130, a dequantizer135, an inverse transformer 140, a filter 145, and a memory 150.

The picture divider 105 may divide an input picture on the basis of atleast one processing unit. In this case, the processing unit may be aprediction unit (PU), a transform unit (TU), or a coding unit (CU).

The predictor 110, as described below, may include an inter predictorwhich performs an inter prediction and an intra predictor which performsan intra prediction. The predictor 110 may generate a prediction blockby performing a prediction for a processing unit of a picture in thepicture divider 105. The processing unit of the picture in the predictor100 may be a CU, a TU, or a PU. In addition, it is determined whether aprediction performed for a corresponding processing unit is an interprediction or an intra prediction, and a specific content (e.g., aprediction mode, etc.) of each prediction method may be determined. Inthis case, the processing unit for performing a prediction may differfrom the processing unit for determining the specific content. Forexample, a prediction method, a prediction mode, etc., may be determinedin a unit of PU, and the prediction may be performed in a unit of TU. Aresidual value (i.e., residual block) between a generated predictionblock and an original block may be input to the transformer 115. Inaddition, prediction mode information used for the prediction, motionvector information, etc., may be coded in the entropy encoder 130together with the residual value and may be delivered to a decoder.

The transformer 115 transforms the residual block on the basis of atransform unit, and generates a transform coefficient. The transformunit of the transformer 115 may be a TU, and may have a quad treestructure. In this case, a size of the transform unit may be determinedin a range of a specific maximum or minimum size. The transformer 115may transform the residual block by using discrete cosine transform(DCT) and/or discrete sine transform (DST).

The quantizer 120 may generate a quantization coefficient by quantizingresidual values transformed in the transformer 115. A value calculatedby the quantizer 120 may be provided to the dequantizer 135 and therearranger 125.

The rearranger 125 may re-sort the quantization coefficient providedfrom the quantizer 120. The re-sorting of the quantization coefficientmay increase coding efficiency in the entropy encoder 130. Therearranger 125 may re-sort quantization coefficients having a form of a2-dimensional block into a 1-dimensional vector form by using acoefficient scanning method. The rearranger 125 may change an order ofcoefficient scanning on the basis of a probabilistic statistics ofcoefficients transmitted from the quantizer, thereby increasing anentropy encoding efficiency in the entropy encoder 130.

The entropy encoder 130 may perform entropy encoding with respect to thequantization coefficients re-sorted by the rearranger 125. The entropyencoder 130 may code a variety of information delivered from therearranger 125 and the predictor 110. The information may include codingunit's quantization coefficient information and block type information,prediction mode information, division unit information, prediction unitinformation and transmission unit information, motion vectorinformation, reference picture information, block's interpolationinformation, filtering information, etc.

The entropy encoding may use Exponential Golomb, CAVLC(Context-AdaptiveVariable Length Coding), and/or CABAC(Context-Adaptive Binary ArithmeticCoding). For example, a table for performing the entropy encoding, suchas a variable length coding (VLC) table, may be stored in the entropyencoder 130. The entropy encoder 130 may perform the entropy encoding byusing the stored VLC table. For another example, in the CABAC entropyencoding method, the entropy encoder 130 may convert a symbol into abinary form, i.e., a bin, and thus may generate a bit-stream byperforming arithmetic encoding on the bin according to a bit generationprobability.

When the entropy encoding is applied, an index having a high value andits corresponding short codeword may be assigned to a symbol having ahigh generation probability, and an index having a high value and itscorresponding long codeword may be assigned to a symbol having a lowgeneration probability. Accordingly, a bit amount for symbols to becoded may be decreased, and an image compression performance may beimproved by the entropy encoding.

The dequantizer 135 may dequantize values quantized by the quantizer120. The inverse transformer 140 may inverse-transform valuesdequantized by the dequantizer 135. Residual values generated in thedequantizer 135 and the inverse transformer 140 may be combined with aprediction block predicted by the predictor 110, and thus areconstructed block may be generated.

The filter 145 may apply an in-loop filter to the reconstructed blockand/or picture. The in-loop filter may include a deblocking filter, asample adaptive offset (SAO), and/or an adaptive loop filter (ALF), etc.

The deblocking filter may remove block distortion which occurs at aboundary between blocks in the reconstructed picture. The SAO may add aproper offset value to a pixel value to compensate for a coding error.The ALF may perform filtering on the basis of a value used to compare anoriginal image with an image reconstructed after filtering a blockthrough the deblocking filter.

Meanwhile, regarding the reconstructed block used in the intraprediction, the filter 145 may not apply the filtering.

The memory 150 may store the reconstructed block or picture calculatedby using the filter 145. The reconstructed block or picture stored inthe memory 150 may be provided to the predictor 110 for performing theinter prediction.

FIG. 2 is a schematic view showing the concept of a predictor accordingto an embodiment of the present invention. Referring to FIG. 2, apredictor 200 may include an inter predictor 210 and an intra predictor220.

The inter predictor 210 may generate a prediction block by performing aprediction on the basis of information of either a previous picture or anext picture of a current picture. Regarding a prediction unit (PU), theinter predictor 210 may select a reference picture, and may select areference block having the same size as the PU as a pixel sample unit.Subsequently, the inter predictor 210 may generate a prediction blockwhich is a sample unit (e.g., a ½ pixel sample unit and a ¼ pixel sampleunit) smaller than an integer unit and thus is the most similar to acurrent PU and of which a residual signal can be minimized and a motionvector to be coded can also be minimized. In this case, the motionvector may be expressed in a unit smaller than an integer pixel.

In addition, the intra predictor 220 may generate the prediction blockby performing the prediction on the basis of pixel information in thecurrent picture. In this case, regarding the PU, the intra predictor 220may determine an intra prediction mode and may perform a prediction onthe basis of the determined intra prediction mode.

An index of the reference picture selected by the inter predictor 210,information on the motion vector, and information on the intraprediction mode selected by the intra predictor 220 may be coded anddelivered to the decoder.

FIG. 3 is a block diagram of an image decoder according to an embodimentof the present invention. Referring to FIG. 3, an image decoder 300 mayinclude an entropy decoder 310, a rearranger 315, a dequantizer 320, aninverse transformer 325, a predictor 330, a filter 335, and a memory340.

When an image bit-stream is input to the image decoder, the inputbit-stream may be decoded according to an operation of processing imageinformation in an image encoder.

The entropy decoder 310 may perform entropy decoding on the inputbit-stream. An entropy decoding method is similar to the aforementionedentropy encoding method. When the entropy decoding is applied, an indexhaving a high value and its corresponding short codeword may be assignedto a symbol having a high generation probability, and an index having ahigh value and its corresponding long codeword may be assigned to asymbol having a low generation probability. Accordingly, a bit amountfor symbols to be coded may be decreased, and an image compressionperformance may be improved by the entropy encoding.

Among a plurality of pieces of information decoded by the entropydecoder 310, information for generating a prediction block may beprovided to the predictor 330, and a residual value subjected to entropydecoding in the entropy decoder may be input to the rearranger 315.

The rearranger 315 may re-sort the bit-stream subjected to the entropydecoding in the entropy decoder 310 according to a re-sorting methodused in an image encoder. The rearranger 315 may perform the re-sortingby reconstructing coefficients expressed in a 1-dimensional vectorformat into coefficients of a 2-dimensional block form. The rearranger315 may receive information related to coefficient scanning performed inthe encoder and may perform re-sorting by using an inverse scanningmethod on the basis of an order of scanning performed in the encoder.

The dequantizer 320 may perform dequantization on the basis of aquantization parameter provided from the encoder and a coefficient valueof a re-sorted block.

According to a result of quantization performed by the image encoder,the inverse transformer 325 may perform inverse DCT and/or inverse DSTwith respect to DCT and DST performed by the transformer of the encoder.The inverse transformation may be performed based on a determinedtransmission unit or an image division unit. The transformer of theencoder may selectively perform the DCT and/or the DST according to aplurality of pieces of information such as a prediction method, acurrent block size, and/or a prediction direction, etc. The inversetransformer 325 of a decoder may perform inverse transformation on thebasis of information on transformation performed in the transformer ofthe encoder.

The predictor 330 may generate a prediction block on the basis ofprediction block generation-related information provided from theentropy decoder 310 and previously decoded block and/or pictureinformation provided from the memory 340. A reconstructed block may begenerated by using a prediction block generated from the predictor 330and a residual block provided from the inverse transformer 325.

The reconstructed block and/or picture may be provided to the filter335. The filter 335 may apply an in-loop filter to the reconstructedblock and/or picture. The in-loop filter may include a deblockingfilter, a sample adaptive offset (SAO), and/or an adaptive loop filter(ALF), etc.

The memory 340 may store the reconstructed picture or block so as to beused as a reference picture or a reference block, or may provide thereconstructed picture to an output element.

FIG. 4 is a schematic view showing the concept of a predictor of animage decoder according to an embodiment of the present invention.

Referring to FIG. 4, a predictor 400 may include an inter predictor 410and an intra predictor 420.

If a prediction mode for the PU is an inter prediction mode, the interpredictor 410 may use information required for the inter prediction ofthe current PU provided from the image encoder, for example, informationregarding a motion vector, a reference picture index, etc., to performan inter prediction on the current PU on the basis of informationincluded in at least one of previous and next pictures of the currentpicture in which the current PU is included. In this case, if a skipflag, merge flag, or the like of a coding unit (CU) received from theencoder is confirmed, the motion information may be derived inaccordance therewith.

The intra predictor 420 may generate a prediction block on the basis ofpixel information in a current picture, when a prediction mode for acorresponding PU is an intra prediction mode. In this case, regardingthe PU, the intra predictor 420 may determine an intra prediction modeand may perform a prediction on the basis of the determined intraprediction mode. Herein, if the intra prediction mode relatedinformation received from an encoder is confirmed, the intra predictionmode may be derived in accordance therewith.

Hereinafter, if an “image” or a “screen” can be used for the samemeaning as a “picture” according to a configuration or expression of thepresent invention, the “picture” can also be referred to as the “image”or the “screen”.

FIG. 5 is a schematic view showing the concept of an example of a quadtree structure of a processing unit in a system according to the presentinvention.

A coding unit (CU) may imply a unit of performing coding/decoding of apicture. One coding block in a picture to be coded may have a depthbased on a quad tree structure and may be partitioned repetitively. Inthis case, a coding block which is no longer partitioned may correspondto the CU, and an encoder may perform a coding process for the CU. Asize of the CU may be various, such as 64×64, 32×32, 16×16, 8×8, etc.

Herein, the coding block which is partitioned repetitively based on thequad tree structure may be called a coding tree block (CTB). One CTB maynot be further partitioned, and in this case, the CTB itself maycorrespond to one CU. Therefore, the CTB may correspond to a largestcoding unit (LCU) which is a CU having a maximum size. Meanwhile, a CUhaving a minimum size in the CTB may be called a smallest coding unit(SCU).

Referring to FIG. 5, through the partitioning, a CTB 500 may have ahierarchical structure consisting of a smaller CU 510. The hierarchicalstructure of the CTB 500 may be specified based on size information,depth information, partition flag information, etc. The informationregarding a size of the CTB, the partition depth information, thepartition flag information, etc., may be transmitted from an encoder toa decoder by being included in a sequence parameter set (SPS) on abit-stream.

Meanwhile, which prediction will be performed between the interprediction and the intra prediction may be determined in a unit of CU.If the inter prediction is performed, an inter prediction mode, motioninformation, etc., may be determined in a unit of PU, and if the intraprediction is performed, an intra prediction mode may be determined in aunit of PU. In this case, as described above, a processing unit by whichthe prediction is performed may be the same as a processing unit bywhich a prediction method and its specific content are determined, orthe two units may be different. For example, the prediction method, theprediction mode, etc., may be determined in a unit of PU, and theprediction may be performed in a unit of transform unit (TU).

Referring to FIG. 5, one CU 510 may be used as one PU or may bepartitioned into a plurality of PUs. In case of an intra prediction 520,a partitioning mode of a CU (and/or PU) may be a 2N×2N or N×N mode(where N is an integer). Herein, the PU in the 2N×2N mode may have asize of 2N×2N, and the PU in the N×N mode may have a size of N×N. Incase of an inter prediction 530, a partitioning mode of a CU (and/or PU)may be a 2N×2N, 2N×N, N×2N, N×N, 2N×nU, 2N×nD, nL×2N or nR×2N mode(where N is an integer). Herein, the PU in the 2N×N mode may have a sizeof 2N×N, and the PU in the N×2N mode may have a size of N×2N. Inaddition, in the 2N×nU mode, one CU may be partitioned into a PU havinga size of 2N×(½)N and a PU having a size of 2N×(3/2)N. In this case, thePU having the size of 2N×(½)N may be located in an upper portion of thePU having the size of 2N×(3/2)N. In the 2N×nD mode, one CU may bepartitioned into a PU having a size of 2N×(3/2)N and a PU having a sizeof 2N×(½)N. In this case, the PU having the size of 2N×(½)N may belocated in a lower portion of the PU having the size of 2N×(3/2)N. Inaddition, in the nL×2N mode, one CU may be partitioned into a PU havinga size of (½)N×2N and a PU having a size of (3/2)N×2N. In this case, thePU having the size of (½)N×2N may be located in a left side of the PUhaving the size of (3/2)N×2N. In the nR×2N mode, one CU may bepartitioned into a PU having a size of (3/2)N×2N and a PU having a sizeof (½)N×2N. In this case, the PU having the size of (½)N×2N may belocated in a right side of the PU having the size of (3/2)N×2N.

The aforementioned partitioning mode is only for one embodiment, andthus the method of partitioning the CU into the PU is not limited to theaforementioned embodiment. For example, in case of the inter prediction530, the partitioning mode of the CU (and/or PU) may use only four typesof mode, i.e., 2N×2N, 2N×N, N×2N, and N×N, and another partitioning modemay be further used in addition to the aforementioned 8 types ofpartitioning mode.

Hereinafter, in the present invention, a current block is a block forwhich a coding, decoding, and/or prediction process is performed atpresent, and may imply a block corresponding to a processing unit whenthe coding, decoding, and/or prediction process is performed. Forexample, if the prediction process is performed on the current block,the current block may correspond to a to-be-predicted blockcorresponding to a current PU. In addition, in the present invention, ablock generated by the prediction is called a prediction block.

A ‘unit’ implies a processing unit when the coding, decoding, etc., isperformed, and thus may be distinguished from a ‘block’ indicating agroup of pixels and/or samples. However, for convenience of explanation,the ‘unit’ may optionally refer to the ‘block’ corresponding to the‘unit’ in the present invention. For example, hereinafter, in thepresent invention, a to-be-predicted block corresponding to one PU maybe referred to as a PU, and a block to be coded/decoded andcorresponding to one CU may be referred to as a CU. Such a distinctionwill be clearly understood by those ordinarily skilled in the art.

Meanwhile, as described above in the embodiments of FIG. 2 and FIG. 4,the intra predictor may perform a prediction on the basis of pixelinformation in a current picture and thus may generate a predictionblock for a current block. For example, the intra predictor may predicta pixel value in the current block by using pixels in a reconstructedblock located in an upper, left, left upper, and/or right upper portionadjacent the current block.

The intra prediction mode may be a vertical mode, a horizontal mode, aDC mode, a planar mode, an angular mode, etc., according to a locationand/or prediction scheme, etc., of reference pixels used to predict apixel value of a current block. In the vertical mode, a prediction maybe performed in a vertical direction by using a pixel value of aneighboring block. In the horizontal mode, a prediction may be performedin a horizontal direction by using the pixel value of the neighboringblock. In addition, in the DC mode, pixel values in the current blockmay be predicted by using an average of pixel values around the currentblock. In the planar mode, a prediction value of a to-be-predicted pixellocated in the current block may be derived by a specific computation onthe basis of a pixel value of a plurality of pixels located adjacent thecurrent block. In this case, the plurality of pixels used to predict theto-be-predicted pixel may be determined differently according to alocation of the to-be-predicted pixel. In the angular mode, a predictionmay be performed according to a predetermined angle and/or directionwith respect to each mode.

The intra predictor may use a predetermined prediction direction andprediction mode value to perform an intra prediction. In this case, forexample, the number of intra prediction modes assignable to the currentblock may differ according to a size of the current block. Table 1 belowshows an embodiment of the number of intra prediction modes assignableto the current block (and/or PU) according to a size of the currentblock (and/or PU).

TABLE 1 The number PU size of modes 4 × 4 18 8 × 8 35 16 × 16 35 32 × 3235 64 × 64 4

For another example, the number of intra prediction modes assignable tothe current block may be a specific fixed value. For example, the numberof intra prediction modes assignable to the current block may be 35. Inthis case, the 35 intra prediction modes may include the aforementionedDC, planar, vertical, horizontal, angular mode, etc.

As described above, after determining the intra prediction mode, theencoder may encode information on the determined intra prediction modeand then transmit it to the decoder. Although the intra prediction modeinformation can be transmitted as a value itself for indicating itsprediction mode, it is also possible to provide a method of transmittingthe intra prediction mode information based on a mode value predictedfor an intra prediction mode to increase a transmission efficiency.Hereinafter, a prediction mode used as a prediction value for an intraprediction mode of a current block is called a most probable mode (MPM)in the present invention.

FIG. 6 is a flowchart showing a method of transmitting intra predictionmode information according to an embodiment of the present invention.

Referring to FIG. 6, an encoder may derive a plurality of MPM candidatesconstituting an MPM candidate list on the basis of a plurality ofneighboring blocks adjacent to a current block (S610).

The encoder may derive the plurality of MPM candidates on the basis ofthe plurality of neighboring blocks, and may generate the MPM candidatelist by allocating the MPM candidate to the MPM candidate list. In thiscase, the encoder may use an intra prediction mode of the neighboringblock directly as the MPM candidate corresponding to the neighboringblock, or may use a particular intra prediction mode determinedaccording to a specific condition as the MPM candidate corresponding tothe neighboring block.

Meanwhile, the encoder may use a specific fixed number of MPM candidatesto encode the intra prediction mode. In this case, the number of MPMcandidates included in the MPM candidate list may be equal to thespecific fixed number. For example, the number of MPM candidatesconstituting the MPM candidate list may be 3. Hereinafter, it is assumedin the present invention that the number of MPM candidates constitutingthe MPM candidate list is 3, for convenience of explanation.

In this case, the number of neighboring blocks used to derive the MPMcandidate may be less than the number of PMP candidates constituting theMPM candidate list. For example, if the number of neighboring blocksused to derive the MPM candidate is 2, the number of MPM candidatesderived in accordance with the neighboring block may be 2. In this case,since the number of MPM candidates constituting the MPM candidate listis fixed to 3, the encoder may determine an additional MPM candidate andmay allocate it to the MPM candidate list. Herein, the MPM candidateadditionally derived may be selected during an intra prediction modeexcept for the MPM candidate derived in accordance with the neighboringblock.

A detailed embodiment of a method of deriving an MPM candidate based ona prediction mode of a neighboring block will be described below.

Referring back to FIG. 6, the encoder may encode intra prediction modeinformation based on the MPM candidate list and may transmit it to thedecoder (S620).

The encoder may generate MPM flag information by determining whether thesame MPM candidate as the intra prediction mode of the current blockexists among the plurality of MPM candidates constituting the MPMcandidate list, that is, whether the prediction value of the intraprediction mode is used directly as the intra prediction mode of thecurrent block. Herein, an MPM flag may correspond to a flag indicatingwhether the identical MPM candidate as the intra prediction mode of thecurrent block exists among the plurality of MPM candidates constitutingthe MPM candidate list, and may be denoted by prev_intra_luma_pred_flagfor example. The generated MPM flag information may be encoded by anentropy encoder of the encoder and then may be transmitted to a decoder.

If the identical MPM candidate as the intra prediction mode of thecurrent block exists in the current block list, the encoder may generateMPM index information indicating which candidate is the same as theintra prediction mode of the current block among the plurality of MPMcandidates constituting the MPM candidate list. For example, the MPMindex information may be denoted by mpm_idx. In this case, the generatedMPM index information may be encoded by the entropy encoder of theencoder and then may be transmitted to the decoder.

If the identical MPM candidate as the intra prediction mode of thecurrent block does not exist in the MPM candidate list, the encoder mayderive a remaining mode corresponding to the intra prediction mode ofthe current block, on the basis of the plurality of MPM candidatesconstituting the MPM candidate list and the intra prediction mode of thecurrent block. In this case, a mode value of the derived remaining modemay be encoded by the entropy encoder of the encoder and then may betransmitted to the decoder.

FIG. 7 is a flowchart showing a method of deriving an intra predictionmode according to an embodiment of the present invention.

Referring to FIG. 7, a decoder may perform decoding by receiving intraprediction mode information from an encoder (S710). The decoding processmay be performed by an entropy encoder of the decoder. The intraprediction mode information received from the encoder may be MPM flaginformation, MPM index information, remaining mode information, etc.

Referring back to FIG. 7, the decoder may derive the plurality of MPMcandidates constituting the MPM candidate list on the basis of aplurality of neighboring blocks adjacent to the current block (S720).That is, the decoder may derive the plurality of MPM candidates on thebasis of the plurality of neighboring blocks, and may generate the MPMcandidate list by allocating the MPM candidate to the MPM candidatelist. A detailed embodiment of a method of deriving an MPM candidate onthe basis of a prediction mode of a neighboring block is describedbelow.

Referring back to FIG. 7, the decoder may derive the intra predictionmode of the current block on the basis of the MPM candidate list and theintra prediction mode information (S730).

The decoder may determine whether the identical MPM candidate as theprediction mode of the current block exists among the plurality of MPMcandidates constituting the MPM candidate list on the basis of the MPMflag information received from the encoder.

If the identical MPM candidate as the prediction mode of the currentblock exists in the MPM candidate list, the decoder may determine an MPMcandidate indicated by the MPM index information to the intra predictionmode of the current block. Since the MPM index information is describedabove with reference to FIG. 6, a detailed description on the MPM indexinformation will be omitted herein. If the same MPM candidate as theprediction mode of the current block does not exist in the MPM candidatelist, the decoder may derive the intra prediction mode of the currentblock on the basis of the MPM list and the remaining mode received fromthe encoder.

When the intra prediction mode of the current block is derived, thedecoder may generate a prediction block corresponding to the currentblock by performing an intra prediction on the current block on thebasis of the derived intra prediction mode.

FIG. 8 is a schematic view showing an embodiment of a neighboring blockused to derive an MPM candidate. In the embodiment of FIG. 8, a currentblock and neighboring blocks adjacent to the current block may berespective blocks corresponding to one PU.

Referring to 810 of FIG. 8, an intra predictor may derive MPM candidatescorresponding to the current block on the basis of a block A 813 locatedin an uppermost portion among left neighboring blocks located to a leftside of the current block and a block B 816 located in a leftmost sideamong upper neighboring blocks adjacent to an upper side of the currentblock. In this case, an MPM candidate corresponding to the block A 813(hereinafter, called an MPM candidate A) may be determined to an intraprediction mode of the block A 813, and an MPM candidate correspondingto the block B 816 (hereinafter, called an MPM candidate B) may bedetermined to an intra prediction mode of the block B 816. However, if aneighboring block (i.e., the block A and/or the block B) is unavailableor satisfies a different specific condition, an MPM candidatecorresponding to the neighboring block (i.e., the block A and/or theblock B) may be determined to a specific intra prediction mode. Adetailed embodiment thereof will be described below.

Meanwhile, as described above, the number of intra prediction modesassignable to the current block may differ depending on a size of thecurrent block. In this case, a mode value of the intra prediction modeassigned to the neighboring block (i.e., the block A and/or the block B)may be greater than a maximum mode value assignable to the currentblock. In this case, the intra predictor may map the intra predictionmode value of the neighboring block (i.e., the block A and/or the blockB) to a mode value assignable to the current block, and thereafter maydetermine an intra prediction mode corresponding to the mapped modevalue to an MPM candidate corresponding to the neighboring block (i.e.,the block A and/or the block B). A method of mapping the intraprediction mode value of the neighboring block to the mode valueassignable to the current block may be shown by Table 2 below as oneembodiment.

TABLE 2 value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17mapIntraPredMode3[value] 0 1 2 3 3 3 1 3 2 2 3 3 1 1 3 3 2 2mapIntraPredMode9[value] 0 1 2 3 4 5 6 7 8 9 3 3 3 3 3 3 3 3 value 18 1920 21 22 23 24 25 26 27 28 29 30 31 32 33 34 mapIntraPredMode3[value] 33 3 3 1 1 1 3 3 3 3 2 2 2 2 3 3 mapIntraPredMode9[value] 3 4 5 5 1 1 6 67 4 8 8 2 2 9 9 3

In the embodiment of Table 2, ‘value’ indicates an intra prediction modevalue of a neighboring block. In addition, if a size of the neighboringblock is the same or identical to a size of the current block and if thenumber of intra prediction modes assignable to the current block is 4,mapIntraPredMode3[value] may indicate a mode value to which the intraprediction mode of the neighboring block is mapped. If the size of theneighboring block is the same or identical to a size of the currentblock and if the number of intra prediction modes assignable to thecurrent block is 18 or 35, mapIntraPredMode9[value] may indicate a modevalue to which the intra prediction mode of the neighboring block ismapped.

For example, if the size of the current block is 64×64, the number ofintra prediction modes assignable to the current block may be 4 (e.g.,an intra prediction mode having a mode value in the range of 0 to 3). Inthis case, if the intra prediction mode value of the neighboring blockexceeds 3, the intra predictor may map the intra prediction mode valueof the neighboring block to a mode value less than or equal to 3 (i.e.,mapIntraPredMode3[value]) as in the embodiment of Table 2, andthereafter may use the mapped mode value as an MPM candidatecorresponding to the neighboring block. For another example, if the sizeof the current block is 4×4, the number of intra prediction modesassignable to the current block may be 18 (e.g., an intra predictionmode having a mode value in the range of 0 to 17). In this case, if anintra prediction mode value of a neighboring block exceeds 17, the intrapredictor may map the intra prediction mode value of the neighboringblock to a mode value less than or equal to 9 (i.e.,mapIntraPredMode9[value]) as in the embodiment of Table 2, andthereafter may use the mapped mode value as an MPM candidatecorresponding to the neighboring block. For another example, if thenumber of intra prediction modes assignable to the current block is 18and if the intra prediction mode value of the neighboring block exceeds17, the intra predictor may map the intra prediction mode value of theneighboring block to a mode value less than or equal to 17.

Unlike the aforementioned embodiment, if the number of intra predictionmodes assignable to the current block is a specific fixed value (i.e.,35), a case where a mode value of an intra prediction mode of aneighboring block (i.e., a block A and/or a block B) is greater than amaximum mode value assignable to the current block may not occur.Therefore, in this case, the intra predictor may not apply the mappingprocess described through the embodiment of Table 2 in the process ofderiving the MPM candidate.

In the embodiment of 810 of FIG. 8, the MPM candidate A corresponding tothe block A 813 and the MPM candidate B corresponding to the block B 816may be derived through the aforementioned process. However, as describedabove, the number of MPM candidates constituting the MPM candidate listmay be fixed to 3. Therefore, the intra predictor may additionallydetermine two MPM candidates if the MPM candidate A is identical to theMPM candidate B, and may additionally determine one MPM candidate if theMPM candidate A is not identical to the MPM candidate B.

In one embodiment, if the MPM candidate A is identical to the MPMcandidate B, an MPM candidate included in an MPM candidate list may bedetermined as follows. For example, if the MPM candidate A is the planarmode or the DC mode, the intra predictor may determine the planar mode,the DC mode, and the vertical mode as the MPM candidate included in theMPM candidate list. In addition, if the MPM candidate A is neither theplanar mode nor the DC mode, the intra predictor may determine the MPMcandidate A and two intra prediction modes having the most similarprediction direction as the MPM candidate A as the MPM candidateincluded in the MPM candidate list.

In addition, if the MPM candidate A is not identical to the MPMcandidate B, an additional MPM candidate included in the MPM candidatelist may be determined as follows for example. If both of the MPMcandidate A and the MPM candidate B are not the planar mode, the planarmode may be determined as the additional MPM candidate. In addition, ifone of the MPM candidate A and the MPM candidate B is the planar modeand both of the MPM candidate A and the MPM candidate B are not the DCmode, the DC mode may be determined as the additional MPM candidate. Inaddition, if one of the MPM candidate A and the MPM candidate B is theplanar mode and the other one is the DC mode, the vertical mode may bedetermined as the additional MPM candidate.

Meanwhile, a location of a neighboring block used to derive the MPMcandidate may be determined differently from the embodiment of 810 ofFIG. 8. 820 of FIGS. 8 and 830 of FIG. 8 show other embodiments of theneighboring block used to derive the MPM candidate.

For example, referring to 820 of FIG. 8, the intra predictor may deriveMPM candidates corresponding to the current block on the basis of ablock A 823 located in a lowermost portion among left neighboring blockslocated to a left side of the current block and a block B 826 located ina rightmost portion among upper neighboring blocks adjacent to an upperside of the current block. For another example, referring to 830 of FIG.8, the intra predictor may derive MPM candidates corresponding to thecurrent block on the basis of a block A 833 located in any portion amongleft neighboring blocks located to a left side of the current block anda block B 836 located in any portion among upper neighboring blocksadjacent to an upper side of the current block. Since a process ofderiving the MPM candidate for each case is similar to the embodiment of810 of FIG. 8, it will be omitted herein.

Hereinafter, for convenience of explanation, it is assumed in thepresent invention that, as in the embodiment of 810 of FIG. 8, MPMcandidates corresponding to a current block are derived on the basis ofa block located in an uppermost portion among left neighboring blockslocated in a left side of the current block and a block located in aleftmost side among upper neighboring blocks adjacent to an upperportion of the current block. In addition, for convenience ofexplanation, it is assumed in the present invention that a block locatedin an uppermost portion among left neighboring blocks adjacent to a leftside of the current block is called a left candidate block (and/or ablock A), and a block located in a leftmost side among upper neighboringblocks adjacent to an upper portion of the current block is called anupper candidate block (and/or a block B). In addition, the MPM candidatederived in accordance with the block A is called an MPM candidate A, andan MPM candidate derived in accordance with the block B is called an MPMcandidate B. However, embodiments derived below are not limited thereto,and may also equally or similarly apply to a case where a location of aneighboring block used to derive the MPM candidate is different fromthat of the embodiment of 810 of FIG. 8.

FIG. 9 is a drawing for explaining a line buffer in which an intraprediction mode is stored.

A plurality of LCUs of FIG. 9 are included in one picture, one slice,and/or one tile. Each square block of FIG. 9 may correspond to one LCU.In an LCUxy (where x and y are integers greater than or equal to 0) ofFIG. 9, x may denote a row in which the LCU is located, and y may denotea column in which the LCU is located.

An intra predictor may perform a prediction process for each LCU shownin FIG. 9, and a process for the LCUs of FIG. 9 may be performedaccording to a raster scan order. For example, in the embodiment of FIG.9, a process for an LCU line 920 corresponding to an LCU1y may beperformed in a direction from the left to the right after a process foran LCU line 910 corresponding to an LCU0y is performed.

Meanwhile, as described above in the embodiments of FIG. 6 to FIG. 8,MPM candidates corresponding to one block (and/or PU) may be derived onthe basis of an intra prediction mode of a neighboring block (and/orneighboring PU) adjacent to the block. Since the PU is a unit whichbelongs to an LCU, intra prediction modes derived from one LCU must bestored in a memory to process an LCU line located in a next rowimmediately next to the LCU line.

In this case, an encoder and a decoder may store one intra predictionmode for each intra mode storing unit. Herein, the ‘intra mode storingunit’ may imply a minimum unit by which an intra prediction mode isstored so as to be used in a prediction when performing the intraprediction. For example, the intra mode storing unit may correspond to ablock having a size of 4×4.

As such, if the intra prediction mode is stored in a block unit having aspecific size, intra prediction modes stored in intra mode storing unitslocated in a lowermost portion in one LCU line may be stored in a bufferto process an LCU line located in a row immediately next to the LCUline. In this case, the intra mode storing units stored in the buffermay constitute one line, and hereinafter this is called an ‘intra modestoring unit line’ in the present invention.

It is assumed in FIG. 9 that the intra mode storing unit corresponds toa 4×4-sized block. Referring to FIG. 9, for a process for an LCU line920 corresponding to an LCU1y, intra prediction modes stored in 4×4blocks located in a lowermost portion in the LCU line 910 correspondingto an LCU0y may be stored in a buffer. 930 of FIG. 9 indicates an intramode storing unit line consisting of 4×4 blocks located in a lowermostportion in the LCU line 910 corresponding to the LCU0y.

As in the aforementioned embodiment, intra prediction modes of an intramode storing unit line located in a lower portion in an LCU line may bestored in a buffer to perform a process for a next LCU line. As such,the buffer which stores intra prediction modes belonging to the intramode storing unit line may be called an ‘intra mode line buffer’.Hereinafter, the intra mode line buffer may also be simply called a‘line buffer’ in the present invention.

FIG. 10 is a schematic view showing an embodiment of a method ofderiving an MPM candidate of a block adjacent to a boundary of an LCU.In the embodiment of FIG. 10, a current block 1010 and neighboringblocks 1030 and 1040 adjacent to the current block may be respectiveblocks corresponding to one PU.

Referring to FIG. 10, the current block 1010 may be a block locatedinside one LCU line, and may be a block adjacent to a boundary 1020 ofthe LCU. In addition, MPM candidates corresponding to the current block1010 may be derived on the basis of a left candidate block A 1030 and anupper candidate block B 1040. In this case, the upper candidate block Bmay be a block belonging to an upper LCU line adjacent to an upperportion of a current LCU line to which the current block belongs. SinceLCUs are processed according to a raster scan order, intra predictionmodes of an intra mode storing unit line (e.g., a line consisting of4×4-sized blocks) located in a lower portion in the LCU must be storedin an intra mode line buffer to process blocks belonging to the currentLCU line (e.g., the current block 1010).

Therefore, a size of a line buffer may be increased in proportion to awidth of a current picture to which the current block 1010 belongs.Since a coding/decoding performance may deteriorate when the size of theline buffer is increased as such, a method of deriving an MPM candidateand a method of storing an intra prediction mode may be provided todecrease the size of a line buffer memory.

FIG. 11 is a schematic view showing an embodiment of a method ofderiving an MPM candidate according to the present invention.

In the embodiment of FIG. 11, a current block 1110 and neighboringblocks 1130 and 1140 adjacent to the current block may be respectiveblocks corresponding to one PU. In addition, a number marked to the leftcandidate block A 1130 and the upper candidate block B 1140 may indicatean intra prediction mode value of each block. That is, in the embodimentof FIG. 11, an intra prediction mode value of the left candidate block1130 may be 10, and an intra prediction mode value of the uppercandidate block 1140 may be 5. In this case, the intra prediction modevalue 10 may correspond to a horizontal mode, and the intra predictionmode value 5 may correspond to one of a plurality of angular modesassignable to the current block 1110.

Referring to FIG. 11, the current block 1110 may be a block locatedinside the current LCU, and may be a block adjacent to an upper boundary1120 of the current LCU. In this case, an MPM candidate A derived inaccordance with the left candidate block A 1130 may be an intraprediction mode of the left candidate block 1130, that is, a horizontalmode corresponding to the mode value 10.

However, since the upper candidate block B 1140 is a block belonging toan upper LCU adjacent to an upper portion of the current LCU, it must bestored in a line buffer in order for the intra prediction mode of theupper candidate block B 1140 to be used as an MPM candidate. Therefore,by not using the intra prediction mode of the upper candidate block B1140 as the MPM candidate of the current block 1110, the intra predictormay remove a line buffer used to store the intra prediction mode. Thisis because, if the intra prediction mode of the upper candidate block B1140 is not used as the MPM candidate of the current block 1110, theintra prediction mode of the upper candidate block B 1140 is notnecessarily stored in the line buffer.

That is, if a neighboring block used to derive an MPM candidate of acurrent block exists outside an LCU to which the current block belongs(and/or outside a boundary of an LCU to which the current blockbelongs), the intra predictor may not use an intra prediction mode ofthe neighboring block as an MPM candidate corresponding to theneighboring block. This may apply only to the upper candidate block 1130as in the aforementioned embodiment, but the present invention is notlimited thereto. Therefore, this may also apply only to a left candidateblock or both to the upper candidate block and the left candidate block.For example, if the current block is adjacent to a left boundary of acurrent LCU, an intra prediction mode of a left candidate block may notbe used as an MPM candidate corresponding to the left candidate block.

If a neighboring block (i.e., a left candidate block and/or an uppercandidate block) used to derive an MPM candidate of a current block islocated outside a current LCU, a certain intra prediction modedetermined by a specific condition may be determined as an MPM candidatecorresponding to the neighboring block. For example, if the leftcandidate block is located outside the current LCU, an intra predictormay determine an MPM candidate A by assuming the intra prediction modedetermined by the specific condition as an intra prediction mode of theleft candidate block. In addition, if the upper candidate block islocated outside the current LCU, the intra predictor may determine anMPM candidate B by assuming the intra prediction mode determined by thespecific condition as an intra prediction mode of the upper candidateblock. This may be regarded that a certain intra prediction modedetermined by the specific condition is assigned to an intra predictionmode of a neighboring block.

In one embodiment, if a neighboring block (i.e., a left candidate blockand/or an upper candidate block) used to derive an MPM candidate of acurrent block is located outside a current LCU, the intra predictor maydetermine a DC mode as an intra prediction mode of the neighboringblock. In this case, the DC mode may be determined as an MPM candidatecorresponding to the neighboring block. That is, the intra predictor maydetermine the DC mode as the MPM candidate corresponding to theneighboring block by assuming the intra prediction mode of theneighboring block to the DC mode.

For example, if the left candidate block is located outside the currentLCU, the intra predictor may determine the DC mode as an intraprediction mode of the left candidate block. In this case, the DC modemay be determined to the MPM candidate A corresponding to the leftcandidate block. In addition, if the upper candidate block is locatedoutside the current LCU, the intra predictor may determine the DC modeas an intra prediction mode of the upper candidate block. In this case,the DC mode may be determined to the MPM candidate mode B correspondingto the upper candidate block.

If an upper candidate block is located outside a current LCU, a processof determining the DC mode as an intra prediction mode of the uppercandidate block may be described as follows in one embodiment.

-   -   The candidate intra prediction mode candIntraPredModeN is        derived as follows.        -   if N is equal to B and yB 1 is less than ((yB>>Log            2CtbSizeY)<<Log 2CtbSizeY), intraPredModeB is set equal to            Intra_DC.

Herein, candIntraPredModeN may indicate an MPM candidate. In this case,if N is A, the candIntraPredModeN may correspond to an MPM candidate Acorresponding to a left candidate block (i.e., a block A). In addition,if N is B, the candIntraPredModeN may correspond to an MPM candidate Bcorresponding to an upper candidate block (i.e., a block B). Inaddition, yB may denote a y-coordinate of a pixel located in a leftmostupper portion in the current block, and log 2CtbSizeY may denote a logvalue of a height (i.e., a size in a y-axis direction) of an LCU towhich the current block belongs. In addition, intraPredModeB may denotean intra prediction mode of an upper candidate block, and Intra_DC maydenote the DC mode.

For another embodiment, if a neighboring block (i.e., a left candidateblock and/or an upper candidate block) used to derive an MPM candidateof a current block is located outside a current LCU, the intra predictormay determine a planar mode as an intra prediction mode of theneighboring block. In this case, the planar mode may be determined as anMPM candidate corresponding to the neighboring block. That is, the intrapredictor may determine the planar mode as the MPM candidatecorresponding to the neighboring block by assuming that the intraprediction mode of the neighboring block to the planar mode.

For example, if the left candidate block is located outside the currentLCU, the intra predictor may determine the planar mode as an intraprediction mode of the left candidate block. In this case, the planarmode may be determined as an MPM candidate A corresponding to the leftcandidate block. In addition, if the upper candidate block is locatedoutside the current LCU, the intra predictor may determine the planarmode as an intra prediction mode of the upper candidate block. In thiscase, the planar mode may be determined as an MPM candidate Bcorresponding to the upper candidate block.

Referring to FIG. 11, the upper candidate block B 1140 may be a blockbelonging to the upper LCU adjacent to the upper portion of the currentLCU. Therefore, an intra predictor may not use an intra prediction modeof the upper candidate block B 1140, that is, an angular modecorresponding to the mode value 5, as an MPM candidate. In this case,for example, the intra predictor may determine the planar mode as anintra prediction mode of the upper candidate block B 1140. In this case,an MPM candidate B corresponding to the upper candidate block B 1140 maybe determined to the planar mode. Herein, a mode value of the planarmode may be 0 for example.

Meanwhile, the neighboring block (e.g., the left candidate block and/orthe upper candidate block) used to derive the MPM candidate of thecurrent block may be unavailable. For example, if the neighboring block(i.e., the left candidate block and/or the upper candidate block) islocated outside a current picture to which the current block belongs(and/or an outside a current picture boundary to which the current blockbelongs), the neighboring block may correspond to the unavailable block.In addition, if the neighboring block (i.e., the left candidate blockand/or the upper candidate block) is located outside a current slice towhich the current block belongs (and/or an outside a current sliceboundary to which the current block belongs), the neighboring block maycorrespond to the unavailable block.

In addition, even in a case where the neighboring block itself (e.g., aleft candidate block and/or an upper candidate block) used to derive theMPM candidate of the current block is available, a prediction mode ofthe neighboring block may not be an intra mode. In this case, theneighboring block may not include valid intra prediction modeinformation.

As described above, if the neighboring block (i.e., the left candidateblock and/or the upper candidate block) is unavailable or if theprediction mode of the neighboring block is not the intra mode, theintra prediction may determine a certain intra prediction modedetermined by a specific condition to an MPM candidate corresponding tothe neighboring block.

In one embodiment, if the neighboring block (i.e., the left candidateblock and/or the upper candidate block) is unavailable or if theprediction mode of the neighboring block is not the intra mode, theintra predictor may determine the DC mode to the MPM candidatecorresponding to the neighboring block. That is, the intra predictor maydetermine the DC mode to the MPM candidate corresponding to theneighboring block by assuming the intra prediction mode of theneighboring block to the DC mode. For example, if the left candidateblock is unavailable or is not the intra block, the intra predictor maydetermine the DC mode to an MPM candidate A corresponding to the leftcandidate block. In addition, if the upper candidate block isunavailable or is not the intra block, the intra predictor may determinethe DC mode to an MPM candidate B corresponding to the upper candidateblock.

If the neighboring block (i.e., the left candidate block and/or theupper candidate block) is unavailable or if the prediction mode of theneighboring block is not the intra mode, a process of determining the DCmode to the MPM candidate corresponding to the neighboring block may beexpressed as follows in one embodiment.

-   -   The candidate intra prediction mode candIntraPredModeN is        derived as follows.        -   If availableN is equal to FALSE, candIntraPredModeN is set            equal to Intra_DC.        -   Otherwise, if PredMode[xBN][yBN] is not equal to MODE_INTRA,            candIntraPredModeN is set equal to Intra_DC,

Herein, availableN may indicate whether a neighboring block (i.e., aleft candidate block and/or an upper candidate block) is available. Inthis case, if N is A, the availableN may indicate whether the leftcandidate block (i.e., block A) is available, and if N is B, theavailableN may indicate whether the upper candidate block (i.e., blockB) is available. In addition, PredMode[xBN][yBN] may indicate aprediction mode of the neighboring block (i.e., the left candidate blockand/or the upper candidate block), and MODE_INTRA may indicate the intramode.

For another example, if the neighboring block (i.e., the left candidateblock and/or the upper candidate block) is unavailable or if theprediction mode of the neighboring block is not the intra mode, theintra predictor may determine the planar mode to an MPM candidatecorresponding to the neighboring mode. That is, the intra predictor maydetermine the planar mode as an MPM candidate corresponding to theneighboring block, by assuming the intra prediction mode of theneighboring block as the planar mode. For example, if the left candidateblock is unavailable or is not the intra block, the intra predictor maydetermine the planar mode to an MPM candidate A corresponding to theleft candidate block. In addition, if the upper candidate block isunavailable or is not the intra block, the intra predictor may determinethe planar mode as an MPM candidate B corresponding to the uppercandidate block.

In another embodiment, if the neighboring block (i.e., the leftcandidate block and/or the upper candidate block) is unavailable or ifthe prediction mode of the neighboring block is not the intra mode, theintra predictor may determine an intra prediction mode of a differentneighboring block adjacent to the neighboring block to an MPM candidatecorresponding to the neighboring block. For example, if the leftcandidate block is unavailable or is not an intra block, the intrapredictor may determine the intra prediction mode of the differentneighboring block adjacent to the left candidate block to an MPMcandidate A corresponding to the left candidate block. In addition, ifthe upper candidate block is unavailable or is not the intra block, theintra predictor may determine an intra prediction mode of a differentneighboring block adjacent to the upper candidate block to an MPMcandidate B corresponding to the upper candidate block.

In the aforementioned embodiments of FIG. 11 and its subsequent figures,the MPM candidate A may be determined on the basis of a location of theleft candidate block (i.e., whether it exists outside a picture, slice,and/or LCU to which the current block belongs) and/or the predictionmode of the left candidate block, and the MPM candidate B may bedetermined on the basis of a location (i.e., whether it exists outside apicture, slice, and/or LCU to which the current block belongs) and/orthe prediction mode of the upper candidate block. The aforementionedembodiments of FIG. 11 and its subsequent figures may be appliedindependently or may be combined in a selective manner to be applied toa method of deriving an MPM candidate.

For example, if the upper candidate block is located outside the currentLCU, the intra predictor may determine the intra prediction mode of theupper candidate block to the DC mode (or planar mode). In this case, theMPM candidate B corresponding to the upper candidate block may bedetermined to the DC mode (or planar mode). In addition, if the uppercandidate block is unavailable or is not an intra block, the intrapredictor may determine the DC mode (or planar mode) to the MPMcandidate B corresponding to the upper candidate block.

In addition, if the left candidate block is unavailable or is not theintra block, the intra predictor may determine the DC mode (or planarmode) to the MPM candidate B corresponding to the left candidate block.However, if the left candidate block is located outside the current LCU,unlike the upper candidate block, the intra prediction mode of the leftcandidate block may be determined directly to the MPM candidate A.

In this case, since the intra prediction mode of the upper candidateblock is not used as the MPM candidate of the current block, the intrapredictor may derive the MPM candidate without having to use an intramode line buffer. Therefore, a line buffer may be removed in theaforementioned embodiment.

FIG. 12 is a schematic view showing an embodiment of a method ofderiving an MPM candidate on the basis of an intra mode storing unit. Inthe embodiment of FIG. 12, a current block 1210, a left candidate blockA 1220, and an upper candidate block B 1230 may be respective blockscorresponding to one PU.

As described above, MPM candidates of the current block 1210 may bederived on the basis of an intra prediction mode of the left candidateblock A 1220 and an intra prediction mode of the upper candidate block B1230. In this case, the intra prediction mode of the left candidateblock A 1220 and the intra prediction mode of the upper candidate blockB 1230 must be stored in a buffer to process the current block 1210. Inparticular, if the current block 1210 is adjacent to an upper boundaryof a current LCU including the current block 1210, the intra predictionmode of the upper candidate block B 1230 may be stored in an intra modeline buffer. In this case, for each intra mode storing unit, one intraprediction mode may be stored in the buffer. It is assumed in theembodiment of FIG. 12 that the intra mode storing unit corresponds to a4×4-sized block.

The intra prediction mode of the left candidate block A 1220 may beacquired from a block located in an uppermost portion among 4×4-sizedblocks (i.e., the intra mode storing unit) adjacent to a left side ofthe current block 1210. In this case, the 4×4-sized block by which theintra prediction mode is acquired may be an intra mode storing unitbelonging to the left candidate block A 1220. In the embodiment of FIG.12, since the left candidate block A 1220 has a size of 4×4, the intramode storing unit may have the same size as the left candidate block A1220.

In addition, the intra prediction mode of the upper candidate block B1230 may be acquired from a block 1240 located in a leftmost side among4×4-sized blocks (i.e., the intra mode storing unit) adjacent to anupper portion of the current block 1210. In this case, the 4×4-sizedblock 1240 may be an intra mode storing unit belonging to the uppercandidate block B 1230. In the embodiment of FIG. 12, since the uppercandidate block B 1230 has a size of 8×8, the intra mode storing unitmay have a size less than that of the upper candidate block B 1230. Inthis case, the 4×4-sized block 1240 by which the intra prediction modeis acquired may be a block located in a lowermost portion in the uppercandidate block B 1230.

As described above in the aforementioned embodiment, if the intra modestoring unit is the 4×4-sized block, one intra prediction mode can bestored for each 4×4-sized block. In this case, since a load of a buffer(and/or a line buffer) in which the intra prediction mode is stored maybe great, an encoder and a decoder may store one intra prediction modewith respect to a plurality of 4×4-sized blocks, thereby being able todecrease a size of the buffer (and/or the line buffer).

For example, the encoder and the decoder may store one intra predictionmode (and/or line buffer) for each of two 4×4-sized blocks. In thiscase, a size of the intra mode storing unit may correspond to a8×4-sized block. In addition, the number of intra prediction modesstored in the buffer (and/or line buffer) and a size of the buffer(and/or line buffer) may be decreased by ½. Therefore, such a method ofstoring an intra prediction mode may also be called ‘2:1 buffer (and/orline buffer) compression’ or ‘2:1 intra mode compression’.

For another example, the encoder and the decoder may store one intraprediction mode in the buffer (and/or line buffer) for each of four4×4-sized blocks. In this case, the size of the intra mode storing unitmay correspond to a 16×4-sized block. In addition, the number of intraprediction modes stored in the buffer (and/or line buffer) and a size ofthe buffer (and/or line buffer) may be decreased by ¼. Therefore, such amethod of storing an intra prediction mode may also be called ‘4:1buffer (and/or line buffer) compression’ or ‘4:1 intra modecompression’.

As described above, if the size of the intra mode storing unit isextended, the encoder and the decoder may store only an intra predictionmode assigned to one block in the buffer (and/or line buffer) among4×4-sized blocks belonging to the intra mode storing unit. In this case,the encoder and the decoder may use only one intra prediction mode toderive an MPM candidate among a plurality of intra prediction modesincluded in one intra mode storing unit. That is, when the MPM candidateis derived on the basis of an intra prediction mode of a block locatedoutside a current LCU (i.e., an LCU to which the current block belongs),the encoder and the decoder may use only a compressed intra predictionmode stored in a buffer (and/or line buffer) having a decreased size.

Although the line buffer is removed in the aforementioned embodiment ofFIG. 11, if an intra mode compression scheme (and/or a line buffercompression scheme) is used, the line buffer may not be removed and onlythe size of the line buffer may be decreased. Therefore, since an intraprediction mode of a neighboring block can be considered when the MPMcandidate is derived, the intra prediction mode can be more accuratelypredicted in comparison with the embodiment of FIG. 11.

FIG. 13 is a schematic view showing embodiments of a 2:1 line buffercompression scheme.

1310 to 1340 of FIG. 13 indicate respective intra mode storing unitlines. As described above with reference to FIG. 9, intra predictionmodes stored in the intra mode storing unit may be used to process alower LCU line adjacent to a lower portion of an LCU line to which theintra mode storing unit line belongs. If a current block is a blockbelonging to the lower LCU line, an upper candidate block correspondingto the current block may be a block belonging to an LCU line adjacent toan upper portion of the lower LCU line. In this case, an intra predictormay use an intra prediction mode stored in the intra mode storing unitline to derive an MPM candidate of the current block.

Each square block of FIG. 13 indicates a 4×4-sized block. In addition,in the embodiment of FIG. 13, a line 1350 indicates a line correspondingto a boundary of a 8×8-sized block (hereinafter, called ‘8×8 blockboundary’), and a line 1360 indicates a line corresponding to a boundaryof a 16×16-sized block (hereinafter, called ‘16×16 block boundary’).Although the boundary of the 16×16-sized block may correspond to theboundary of the 8×8-sized block, the line 1360 may also be referred toas the 16×16 block boundary in the embodiment of FIG. 13.

Referring to FIG. 13, one intra mode storing unit line may consist of aplurality of intra mode storing units. In this case, the intra modestoring unit may consist of two 4×4-sized blocks, and may have a size of8×4. That is, an encoder and a decoder may store one intra predictionmode for each of two 4×4 blocks. In this case, a size of a memory usedto store the intra prediction mode may be decreased by ½. In theembodiment of FIG. 13, each intra mode storing unit constituting theintra mode storing unit line may be located between one 8×8 blockboundary and one 16×16 block boundary adjacent thereto.

In the 2:1 line buffer compression scheme, only an intra prediction modecorresponding to one block may be stored in a line buffer between two4×4-sized blocks constituting one intra mode storing unit line. In thiscase, an upper candidate block referred by a current block to derive anMPM candidate may include a 4×4 block of which an intra prediction modeis not stored in a line buffer. In this case, the encoder and/or thedecoder may use an intra prediction mode of another 4×4 block (i.e., ablock in which an intra prediction mode is stored) belonging to the sameintra mode storing unit as the 4×4 block to derive an MPM candidate.

Referring to 1310 of FIG. 13, the encoder and the decoder may store onlyan intra prediction mode of a block located in a left side into the linebuffer between two 4×4-sized blocks belonging to the intra mode storingunit. In this case, a block referred by the current block to derive anMPM candidate may be a 4×4-sized block located in a right side in anintra mode storing unit (e.g., a block included in an upper candidateblock corresponding to the current block). In this case, the encoder andthe decoder may use an intra prediction mode of a block located in aleft side in the intra mode storing unit to derive the MPM candidate.

That is, in the embodiment of 1310 of FIG. 13, a 4×4 block located in aleft side in the intra mode storing unit may represent two 4×4 blocksbelonging to the intra mode storing unit. In addition, a 4×4 blocklocated in a right side in the intra mode storing unit may share anintra prediction mode of a 4×4 block located in a left side.

Referring to 1320 of FIG. 13, the encoder and the decoder may store onlyan intra prediction mode of a block located in a right side into theline buffer between two 4×4-sized blocks belonging to the intra modestoring unit. In this case, a block referred by the current block toderive an MPM candidate may be a 4×4-sized block located in a left sidein an intra mode storing unit (e.g., a block included in an uppercandidate block corresponding to the current block). In this case, theencoder and the decoder may use an intra prediction mode of a blocklocated in a right side in the intra mode storing unit to derive the MPMcandidate.

That is, in the embodiment of 1320 of FIG. 13, a 4×4 block located in aright side in the intra mode storing unit may represent two 4×4 blocksbelonging to the intra mode storing unit. In addition, a 4×4 blocklocated in a left side in the intra mode storing unit may share an intraprediction mode of a 4×4 block located in a right side.

Referring to 1330 of FIG. 13, the encoder and the decoder may store onlyan intra prediction mode of a block adjacent to the 16×16 block boundary1360 between two 4×4-sized blocks belonging to the intra mode storingunit. In this case, a block referred by the current block to derive anMPM candidate may be a 4×4-sized block adjacent to the 8×8 blockboundary 1350 in the intra mode storing unit (e.g., a block included inan upper candidate block corresponding to the current block). In thiscase, the encoder and the decoder may use an intra prediction mode of ablock adjacent to the 16×16 block boundary 1360 in the intra modestoring unit to derive the MPM candidate.

That is, in the embodiment of 1330 of FIG. 13, a 4×4 block adjacent tothe 16×16 block boundary 1360 in the intra mode storing unit mayrepresent two 4×4 blocks belonging to the intra mode storing unit. Inaddition, a 4×4 block adjacent to the 8×8 block boundary 1350 in theintra mode storing unit may share an intra prediction mode of a 4×4block located adjacent to the 16×16 block boundary 1360.

Referring to 1340 of FIG. 13, the encoder and the decoder may store onlyan intra prediction mode of a block adjacent to the 8×8 block boundary1350 between two 4×4-sized blocks belonging to the intra mode storingunit. In this case, a block referred by the current block to derive anMPM candidate may be a 4×4-sized block adjacent to the 16×16 blockboundary 1360 in the intra mode storing unit (e.g., a block included inan upper candidate block corresponding to the current block). In thiscase, the encoder and the decoder may use an intra prediction mode of ablock adjacent to the 8×8 block boundary 1350 in the intra mode storingunit to derive the MPM candidate.

That is, in the embodiment of 1340 of FIG. 13, a 4×4 block adjacent tothe 8×8 block boundary 1350 in the intra mode storing unit may representtwo 4×4 blocks belonging to the intra mode storing unit. In addition, a4×4 block adjacent to the 16×16 block boundary 1360 in the intra modestoring unit may share an intra prediction mode of a 4×4 block locatedadjacent to the 8×8 block boundary 1350.

FIG. 14 is a schematic view showing embodiments of a 4:1 line buffercompression scheme.

1410 to 1440 of FIG. 14 indicate respective intra mode storing unitlines. As described above with reference to FIG. 9, intra predictionmodes stored in the intra mode storing unit may be used to process alower LCU line adjacent to a lower portion of an LCU line to which theintra mode storing unit line belongs. If a current block is a blockbelonging to the lower LCU line, an upper candidate block correspondingto the current block may be a block belonging to an LCU line adjacent toan upper portion of the lower LCU line. In this case, an intra predictormay use an intra prediction mode stored in the intra mode storing unitline to derive an MPM candidate of the current block.

Each square block of FIG. 14 indicates a 4×4-sized block. In addition,in the embodiment of FIG. 14, a line 1470 indicates a line correspondingto a boundary of a 16×16-sized block (hereinafter, called ‘16×16 blockboundary’), and a line 1480 indicates a line corresponding to a boundaryof a 32×32-sized block (hereinafter, called ‘32×32 block boundary’).Although the boundary of the 32×32-sized block may correspond to theboundary of the 16×16-sized block, the line 1480 may also be referred toas the 32×32 block boundary in the embodiment of FIG. 14.

Referring to FIG. 14, one intra mode storing unit line may consist of aplurality of intra mode storing units. In this case, the intra modestoring unit may consist of four 4×4-sized blocks, and may have a sizeof 16×4. That is, an encoder and a decoder may store one intraprediction mode for each of four 4×4 blocks. In this case, a size of amemory used to store the intra prediction mode may be decreased by ¼. Inthe embodiment of FIG. 14, each intra mode storing unit constituting theintra mode storing unit line may be located between two 16×16 blockboundaries adjacent to each other.

Hereinafter, among the four 4×4-sized blocks constituting the intra modestoring unit in the embodiment of FIG. 14, a block located in a leftmostside is called a first 4×4 block, and a 4×4-sized block adjacent to thefirst 4×4 block is called a second 4×4 block. In addition, in theembodiment of FIG. 14, a 4×4-sized block adjacent to a right size of thesecond 4×4 block in the intra mode storing unit is called a third 4×4block, and a 4×4-sized block adjacent to a right side of the third 4×4block is called a fourth 4×4 block.

In the 4:1 line buffer compression scheme, only an intra prediction modecorresponding to one block may be stored in a line buffer among four4×4-sized blocks constituting one intra mode storing unit line. In thiscase, an upper candidate block referred by the current block to derivean MPM candidate may include a 4×4 block of which an intra predictionmode is not stored in a line buffer. In this case, the encoder and/orthe decoder may use an intra prediction mode stored in a line bufferamong intra prediction modes of other 4×4 blocks belonging to the sameintra mode storing unit as the 4×4 block to derive an MPM candidate.

Referring to 1410 of FIG. 14, the encoder and the decoder may store onlyan intra prediction mode of the first 4×4 block among the four 4×4-sizedblocks belonging to the intra mode storing unit. In this case, a blockreferred by the current block to derive an MPM candidate may be another4×4 block (e.g., the second 4×4 block, the third 4×4 block, or thefourth 4×4 block) other than the first 4×4 block. In this case, theencoder and the decoder may use an intra prediction mode of the first4×4 block in the intra mode storing unit to derive the MPM candidate.

That is, in the embodiment of 1410 of FIG. 14, the first 4×4 block inthe intra mode storing unit may represent the four 4×4 blocks belongingto the intra mode storing unit. In addition, the second 4×4 block, third4×4 block, and fourth 4×4 block in the intra mode storing unit may sharethe intra prediction mode of the first 4×4 block.

Referring to 1420 of FIG. 14, the encoder and the decoder may store onlyan intra prediction mode of the second 4×4 block into the line bufferamong the four 4×4-sized blocks belonging to the intra mode storingunit. In this case, a block referred by the current block to derive anMPM candidate may be another 4×4 block (e.g., the first 4×4 block, thethird 4×4 block, or the fourth 4×4 block) other than the second 4×4block. In this case, the encoder and the decoder may use an intraprediction mode of the second 4×4 block in the intra mode storing unitto derive the MPM candidate.

That is, in the embodiment of 1420 of FIG. 14, the second 4×4 block inthe intra mode storing unit may represent the four 4×4 blocks belongingto the intra mode storing unit. In addition, the first 4×4 block, third4×4 block, and fourth 4×4 block in the intra mode storing unit may sharean intra prediction mode of the second 4×4 block.

Referring to 1430 of FIG. 14, the encoder and the decoder may store onlyan intra prediction mode of the third 4×4 block among the four 4×4-sizedblocks belonging to the intra mode storing unit. In this case, a blockreferred by the current block to derive an MPM candidate may be another4×4 block (e.g., the first 4×4 block, the second 4×4 block, or thefourth 4×4 block) other than the third 4×4 block. In this case, theencoder and the decoder may use an intra prediction mode of the third4×4 block in the intra mode storing unit to derive the MPM candidate.

That is, in the embodiment of 1430 of FIG. 14, the third 4×4 block inthe intra mode storing unit may represent the four 4×4 blocks belongingto the intra mode storing unit. In addition, the first 4×4 block, second4×4 block, and fourth 4×4 block in the intra mode storing unit may sharean intra prediction mode of the third 4×4 block.

Referring to 1440 of FIG. 14, the encoder and the decoder may store onlyan intra prediction mode of the fourth 4×4 block among the four4×4-sized blocks belonging to the intra mode storing unit. In this case,a block referred by the current block to derive an MPM candidate may beanother 4×4 block (e.g., the first 4×4 block, the second 4×4 block, orthe third 4×4 block) other than the fourth 4×4 block. In this case, theencoder and the decoder may use an intra prediction mode of the fourth4×4 block in the intra mode storing unit to derive the MPM candidate.

That is, in the embodiment of 1440 of FIG. 14, the fourth 4×4 block inthe intra mode storing unit may represent the four 4×4 blocks belongingto the intra mode storing unit. In addition, the first 4×4 block, second4×4 block, and third 4×4 block in the intra mode storing unit may sharean intra prediction mode of the fourth 4×4 block.

Referring to 1450 of FIG. 14, the encoder and the decoder may store onlyan intra prediction mode of a block adjacent to the 32×32 block boundary1480 among the four 4×4-sized blocks belonging to the intra mode storingunit. In this case, a block referred by the current block to derive anMPM candidate may be a 4×4 block not adjacent to the 32×32 blockboundary 1480 in the intra mode storing unit. In this case, the encoderand the decoder may use an intra prediction mode of the block adjacentto the 32×32 block boundary 1480 in the intra mode storing unit toderive the MPM candidate.

That is, in the embodiment of 1450 of FIG. 14, the 4×4 block adjacent tothe 32×32 block boundary 1480 in the intra mode storing unit mayrepresent the four 4×4 blocks belonging to the intra mode storing unit.In addition, the three 4×4 blocks not adjacent to the 32×32 blockboundary 1480 in the intra mode storing unit may share the intraprediction mode of the 4×4 block adjacent to the 32×32 block boundary1480.

Referring to 1460 of FIG. 14, the encoder and the decoder may store onlyan intra prediction mode of the block adjacent to the 16×16 blockboundary 1470 among the four 4×4-sized blocks belonging to the intramode storing unit. In this case, a block referred by the current blockto derive an MPM candidate may be a 4×4 block not adjacent to the 16×16block boundary 1470 in the intra mode storing unit. In this case, theencoder and the decoder may use an intra prediction mode of the blockadjacent to the 16×16 block boundary 1470 in the intra mode storing unitto derive the MPM candidate.

That is, in the embodiment of 1460 of FIG. 14, the 4×4 block adjacent tothe 16×16 block boundary 1470 in the intra mode storing unit mayrepresent the four 4×4 blocks belonging to the intra mode storing unit.In addition, the three 4×4 blocks not adjacent to the 16×16 blockboundary 1470 in the intra mode storing unit may share an intraprediction mode of the 4×4 block adjacent to the 16×16 block boundary1470.

In 1410 to 1460 of FIG. 14 described above, embodiments of a block ofwhich an intra prediction mode is stored among the four 4×4 blocksbelonging to the intra mode storing unit are described. However, thepresent invention is not limited thereto, and thus 4:1 line buffercompression may also equally or similarly apply to a case where alocation of the block of which the intra prediction mode is stored isdetermined differently from those described above in 1410 to 1460 ofFIG. 14.

Meanwhile, the aforementioned buffer (and/or line buffer) compressionscheme described in the embodiments of FIG. 12 to FIG. 14 may apply toall blocks to be encoded/decoded in an intra mode for one example, ormay apply only to a block adjacent to an LCU boundary for anotherexample. For another example, the buffer (and/or line buffer)compression scheme may apply to both of a left candidate block and anupper candidate block which are used to derive an MPM candidate, or mayapply only to one block between the left candidate block and the uppercandidate block.

Such embodiments may be applied independently or may be combined in aselective manner to be applied to a process of deriving an MPMcandidate.

For example, the encoder and the decoder may not apply theaforementioned buffer (and/or line buffer) to the left candidate block.In this case, intra prediction modes corresponding to the left candidateblock may be stored in a buffer (and/or line buffer) in a 4×4 blockunit. In addition, the encoder and the decoder may apply theaforementioned buffer (and/or line buffer) to the upper candidate block.In this case, as to the upper candidate block, one intra prediction modemay be stored for each of two (or four) 4×4 blocks. In this case, a sizeof the buffer (and/or line buffer) used to store the intra predictionmode may be decreased by ½ (or ¼).

Although the aforementioned exemplary system has been described on thebasis of a flowchart in which steps or blocks are listed in sequence,the steps of the present invention are not limited to a certain order.Therefore, a certain step may be performed in a different step or in adifferent order or concurrently with respect to that described above.Further, it will be understood by those ordinary skilled in the art thatthe steps of the flowcharts are not exclusive. Rather, another step maybe included therein or one or more steps may be deleted within the scopeof the present invention.

The aforementioned embodiments include various exemplary aspects.Although all possible combinations for representing the various aspectscannot be described, it will be understood by those skilled in the artthat other combinations are also possible. Therefore, all replacements,modifications and changes should fall within the spirit and scope of theclaims of the present invention.

1-15. (canceled)
 16. An image decoding method comprising: setting afirst candidate intra prediction mode corresponding to a left candidateblock on the basis of a location of the left candidate block adjacent toa left side of a current block; setting a second candidate intraprediction mode corresponding to an upper candidate block on the basisof a location of the upper candidate block adjacent to an upper portionof the current block; generating a candidate mode list including aplurality of candidate intra prediction modes on the basis of the firstcandidate intra prediction mode and the second candidate intraprediction mode; setting one candidate intra prediction mode as an intraprediction mode of the current block among a plurality of candidateintra prediction modes constituting the candidate mode list, andperforming an intra prediction on the current block on the basis of thedetermined intra prediction mode to generate a prediction blockcorresponding to the current block; and generating a reconstructed blockon the basis of the prediction block, wherein the first candidate intraprediction mode or the second candidate intra prediction mode is set toDC mode when the left candidate block or the upper candidate block isnot available.
 17. The image decoding method of claim 16, wherein thesetting the first candidate intra prediction mode comprises determiningthat the left candidate block is not available when the left candidateblock is located outside the CTB to which the current block belongs andsets the first candidate intra prediction mode to DC mode, the settingthe second candidate intra prediction mode comprises determining thatthe upper candidate block is not available when the upper candidateblock is located outside the CTB to which the current block belong andsets the second candidate intra prediction mode to DC.
 18. The imagedecoding method of claim 16: wherein the setting of the first candidateintra prediction mode comprises determining that the left candidateblock is not available when the left candidate block is located outsidea current picture to which the current block belongs and sets the firstcandidate intra prediction mode to a DC mode, and wherein the setting ofthe second candidate intra prediction mode comprises determining thatthe upper candidate block is not available when the upper candidateblock is located outside the current picture and sets the secondcandidate intra prediction mode to the DC mode.
 19. The image decodingmethod of claim 16: wherein the setting of the first candidate intraprediction mode comprises determining that the left candidate block isnot available when the left candidate block is located outside a currentslice to which the current block belongs and setting the first candidateintra prediction mode to a DC mode, and wherein the setting of thesecond candidate intra prediction mode comprises determining that theupper candidate block is not available when the upper candidate block islocated outside the current slice and setting the second candidate intraprediction mode to the DC mode.
 20. The image decoding method of claim16: wherein the setting of the first candidate intra prediction modecomprises determining that the left candidate block is not availablewhen a prediction mode of the left candidate block is not an intra modeand sets the first candidate intra prediction mode to a DC mode, andwherein the setting of the second candidate intra prediction modecomprises determining that the upper candidate block is not availablewhen a prediction mode of the upper candidate block is not the intramode and setting the second candidate intra prediction mode to the DCmode.